package service;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import dao.BlogMapper;
import entity.Blog;
import service.BlogService;

import java.util.List;

@Service
public class BlogServiceImpl implements BlogService{

    @Resource
    private BlogMapper blogMapper;

    @Override
    public int deleteByPrimaryKey(Integer bid) {
        return blogMapper.deleteByPrimaryKey(bid);
    }

    @Override
    public int insert(Blog record) {
        return blogMapper.insert(record);
    }

    @Override
    public int insertSelective(Blog record) {
        return blogMapper.insertSelective(record);
    }

    @Override
    public Blog selectByPrimaryKey(Integer bid) {
        return blogMapper.selectByPrimaryKey(bid);
    }

    @Override
    public int updateByPrimaryKeySelective(Blog record) {
        return blogMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Blog record) {
        return blogMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Blog> getFirendBlog(Integer uid, Integer start, Integer pageSize) {
        return blogMapper.getFirendBlog(uid,start,pageSize);
    }

    @Override
    public int getFirendBlogCount(Integer uid) {
        return blogMapper.getFirendBlogCount(uid);
    }

    @Override
    public int getFirendCount(Integer uid) {
        return blogMapper.getFirendCount(uid);
    }

    @Override
    public List<Blog> getBlog() {
        return blogMapper.getBlog();
    }

    @Override
    public int getBlogCount() {
        return blogMapper.getBlogCount();
    }

    @Override
    public List<Blog> getBlogList() {
        return blogMapper.getBlogList();
    }

    @Override
    public List<Blog> getOneselfBlog(Integer uid, Integer is) {
        return blogMapper.getOneselfBlog(uid,is);
    }

    @Override
    public int gerOneselfBlogCount(Integer uid) {
        return blogMapper.getFirendBlogCount(uid);
    }

}
